package com.sgb.kjwl.model.entity;

import android.text.TextUtils;

public class PopularWorkersEntity {

    private String teamName;
    private String avatarAddress;
    private String no;
    private String address;
    private String serviceAreaName;
    private String userNo;
    private int count;
    private int isCompany;
    private String categoryName;
    private String companyId;
    private String phoneNumber;
    private String companyNo;
    private long createTime;
    private String teamSize;
    private String teamNumber;
    private String contact;
    private int teamType; //工队类型
    private String companyName;
    private String teamTypeName; //工程类型
    private String category;
    private String affiliatedUnitPic;
    private String legalComName;

    public String getLegalComName() {
        return legalComName;
    }

    public void setLegalComName(String legalComName) {
        this.legalComName = legalComName;
    }

    public String getCategory() {
        if (category == null) {
            return "";
        }
        return category;
    }

    public String threeLevelCategory() {
        if (category == null) {
            return "";
        }

        String[] split = category.split("\\|");
        if (split.length < 3) {
            return category;
        } else {
            return String.format("%s|%s|%s", split[0], split[1], split[2]);
        }
    }

    public String getAffiliatedUnitPic() {
        return affiliatedUnitPic;
    }

    public void setAffiliatedUnitPic(String affiliatedUnitPic) {
        this.affiliatedUnitPic = affiliatedUnitPic;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getTeamNumber() {
        return teamNumber;
    }

    public void setTeamNumber(String teamNumber) {
        this.teamNumber = teamNumber;
    }

    public String getTeamTypeName() {
        return teamTypeName;
    }

    public void setTeamTypeName(String teamTypeName) {
        this.teamTypeName = teamTypeName;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public int getTeamType() {
        return teamType;
    }

    public void setTeamType(int teamType) {
        this.teamType = teamType;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public String getAvatarAddress() {
        return avatarAddress;
    }

    public void setAvatarAddress(String avatarAddress) {
        this.avatarAddress = avatarAddress;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getServiceAreaName() {
        return serviceAreaName;
    }

    public void setServiceAreaName(String serviceAreaName) {
        this.serviceAreaName = serviceAreaName;
    }

    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getIsCompany() {
        return isCompany;
    }

    public void setIsCompany(int isCompany) {
        this.isCompany = isCompany;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getTeamSize() {
        return teamSize;
    }

    public void setTeamSize(String teamSize) {
        this.teamSize = teamSize;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String setUpstage(String category) {
        if (!TextUtils.isEmpty(category)) {
            String[] split = category.split("\\|");
            return split[split.length - 1];
        } else {
            return "";
        }
    }
}
